package com.twinkle.xiaohashu.oss.controller;

import com.twinkle.framework.biz.operationlog.aspect.ApiOperationLog;
import com.twinkle.framework.common.response.Response;
import com.twinkle.xiaohashu.oss.service.FileService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@Slf4j
@RestController
@RequestMapping("/file")
public class FileController {
    @Resource
    private FileService fileService;

    @PostMapping(value = "/upload")
    public Response<?> uploadFile(MultipartFile file) {
        return fileService.uploadFile(file);
    }
}
